package com.hairline.service;

import com.hairline.mapper.ConfigMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class ServiceConfigImpl implements ServiceConfig {
    @Autowired
    ConfigMapper configMapper;

    @Override
    public Map getMall() {
        HashMap<String, String> map = new HashMap<>();
        map.put("cskaoyanmall_mall_name",configMapper.getname());
        map.put("cskaoyanmall_mall_qq",configMapper.getqq());
        map.put("cskaoyanmall_mall_phone",configMapper.getphone());
        map.put("cskaoyanmall_mall_address",configMapper.getaddress());
        return map;
    }

    @Override
    public Map getExpress() {
        HashMap<String, String> map = new HashMap<>();
        map.put("cskaoyanmall_express_freight_value",configMapper.getFreightValue());
        map.put("cskaoyanmall_express_freight_min",configMapper.getFreightmin());
        return map;
    }

    @Override
    public Map getOrder() {
        HashMap<String, String> map = new HashMap<>();
        map.put("cskaoyanmall_order_unconfirm",configMapper.getunconfirm());
        map.put("cskaoyanmall_order_unpaid",configMapper.getunpaid());
        map.put("cskaoyanmall_order_comment",configMapper.getcomment());
        return map;
    }

    @Override
    public Map getWX() {
        HashMap<String, String> map = new HashMap<>();
        map.put("cskaoyanmall_wx_share",configMapper.getshare());
        map.put("cskaoyanmall_wx_index_brand",configMapper.getbrand());
        map.put("cskaoyanmall_wx_index_topic",configMapper.gettopic());
        map.put("cskaoyanmall_wx_index_hot",configMapper.gethot());
        map.put("cskaoyanmall_wx_catlog_goods",configMapper.getgoods());
        map.put("cskaoyanmall_wx_catlog_list",configMapper.getlist());
        map.put("cskaoyanmall_wx_index_new",configMapper.getnew());
        return map;
    }
}
